﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class HouseLet : System.Web.UI.Page
{

    protected string _cid = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        _cid = Request.QueryString["cid"];
        if (string.IsNullOrEmpty(_cid))
        {
            _cid ="58";
        }
        else
        {
            if (!Whir.Common.WebHelper.Utils.IsInt(_cid))
                _cid = "58";
        }
        if (!IsPostBack)
        {
            GetList();
            
        }
    }

    private void GetList()
    {
        string sql = "select RoomNumber,area,rent,manageCost,remarks from Whir_U_News where TypeID=58";
        DataTable dt = Whir.SQLServerDAL.DbHelperSQL.Query(sql).Tables[0];
        rptList.DataSource = dt;
        rptList.DataBind();
    }

    protected string GetFieldName(int FieldId)
    {
        
        Whir.BLL.Whir_Field bll = new Whir.BLL.Whir_Field();
        Whir.Model.Whir_Field model = bll.GetModel(FieldId);
        if (model != null)
        {
            return model.alias;
        }
        return "";
    }
}
